package com.jzoom.zoom.server;

import com.jzoom.zoom.common.filter.Filter;

public class ZoomWebApplication {

	public static final Filter<String> classpathFilter = new Filter<String>() {
		@Override
		public boolean accept(String value) {
			return value.contains(".m2") || value.contains("classes");
		}
	};

	public static void start(int port) throws Exception {
		
		WebAppServer app = new WebAppServer(classpathFilter);
		app.setPort(port);
		app.setContextPath("/");
		app.setResourceBase("src/main/webapp");
		ZoomServer server = new ZoomServer(app,classpathFilter) ;
		server.setScanFilter("!.*&!*.log&!*.db&!*.git*&!*.html&!*.js&!*.css");
		server.setInterval(1000);
		server.startup();
	}
}
